XhtmlConformanceSection Class [IIS 7 and higher]

Specifies the XHTML rendering mode for ASP.NET applications.

Syntax

class XhtmlConformanceSection : ConfigurationSection

Methods

The following table lists the methods exposed by the XhtmlConformanceSection class.

Name

Description

GetAllowDefinition

(Inherited from ConfigurationSection.)

GetAllowLocation

(Inherited from ConfigurationSection.)

RevertToParent

(Inherited from ConfigurationSection.)

SetAllowDefinition

(Inherited from ConfigurationSection.)

SetAllowLocation

(Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the XhtmlConformanceSection class.

Name

Description

Location

(Inherited from ConfigurationSection.) A key property.

Mode

A read/write sint32 value that specifies the XHTML rendering mode for ASP.NET applications. The possible values are listed later in the Remarks section.

Path

(Inherited from ConfigurationSection.) A key property.

SectionInformation

(Inherited from ConfigurationSection.)

Subclasses

This class contains no subclasses.

Remarks

By default, when you are working with browsers that support HTML 4.0 or later, ASP.NET pages and controls render markup that is compatible with the XHTML 1.0 Transitional standard. However, under some circumstances, you might not want ASP.NET to render XHTML markup. This is typically true when you have existing pages that rely on tags or attributes that would ordinarily be prohibited by XHTML.

The following table lists the possible values for the Mode property. The default is 0 (Transitional).

Value

Keyword

Description

0

Transitional

XHTML markup is rendered as conforming to the XHTML 1.0 Transitional standard.

1

Legacy

Reverts to their old behavior a number of rendering changes that are likely to break existing applications. There is no mechanism to revert all changes made to comply with the XHTML specification.

NoteNote:
Use this setting to maintain conformance with ASP.NET 1.1 rendering.

2

Strict

Specifies strict conformance with the XHTML 1.0 standard. The key change that occurs is that the name attribute is no longer rendered on the form tag.

Inheritance Hierarchy

ConfigurationSection

   XhtmlConformanceSection

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

ConfigurationSection Class [IIS 7 and higher]

Other Resources

xhtmlConformance Element (ASP.NET Settings Schema)